﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 组合模式
{
  public  class DomainLeaf: AbstractDomain
    {

     

   
      
        public override void Commission(double total)
        {
            double result = total * this.Percent / 100;
            Console.WriteLine($"this {this.Name} 提成 {result}");
     
        }

        public override void AddChild(Domain domainChild)
        {
            throw new Exception("这里不能AddChild");
        }
    }
}
